package com.streetsmart.test;
/**
 * Test activity to fetch the distance between two geolocations
 */
import org.json.JSONException;

import com.streetsmart.R;
import com.streetsmart.Utilities;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

public class DrivingDistanceActivity extends Activity {
	
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.driving_distance);
	}
	
	public void getDistance(View v) throws JSONException{
		EditText src = (EditText) findViewById(R.id.editTextSource);
		EditText dst = (EditText) findViewById(R.id.editTextDest);
		EditText display = (EditText) findViewById(R.id.editTextDisplay);
		String source = src.getText().toString();
		String destination = dst.getText().toString();
		//String result[] = Utilities.getDistance(source, destination);
		//display.setText(result[2]);
	}
	
	@Override
	public void onBackPressed(){
		finish();
	}
}
